package huajiu_com_weixinproject.weixin_project;

import java.util.Random;
import java.util.UUID;

public class uuid {
	
	
	public static void main(String[] args) {
		//System.out.println(getUUID());
		for (int i = 0; i < 10; i++) {
			random();
		}
	}

	public static String getUUID(){ 
		String uuid = UUID.randomUUID().toString().substring(0, 32); 
		int sum=0;
		for (int i = 0; i < uuid.length(); i++) {
			sum++;
		}
		System.out.println(sum);
		//去掉“-”符号 
		return uuid.replaceAll("-", "");
		}
	
	public static void random(){
		Random random = new Random();
		int randomNum = random.nextInt(2);
		System.out.println(randomNum);
	}
}
